home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: SaveBufferAs_TIFF.ifx.pre
- * Modified by dhomas trenn (01 Mar 1999)
- * -> Modified to support TIFF images
- *
- * Copyright © 1992-1996 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Save main buffer as ILBM.
- *
- * Inputs:
- * Word(Arg(1),1) = Sequence number (?)
- * Word(Arg(1),2) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- options results
-
- base = 'Autofx_SaveBufferAsTIFF_'
- seq = word(arg(1),1)
-
- lastpath = getclip(base'Path'seq)
- lastext = getclip(base'Ext'seq)
- lzw = getclip(base'LZW'seq)
-
- if lzw = "" then lzw = "0"
- if lastext = "" & lastpath = "" then lastext = ".tif"
-
- if lastpath = "" then do
- GetPrefs SavePath
- lastpath = result
- end
-
- Gadget.1 = 'STRING 120 5 200 14 "Output Path:" "'lastpath'"'
- Gadget.2 = 'FILEREQ 321 5 20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
- Gadget.3 = 'STRING 120 20 200 14 "New Extension:" "'lastext'"'
- Gadget.4 = 'TEXT 120 35 1 1 "(** = current frame number)" 1'
- Gadget.5 = 'CHECK 120 50 26 11 "LZW Compression?"' lzw
- Gadget.6 = 'END'
-
- NewComplexRequest '"Save Buffer As TIFF"' Gadget 360 68
- if rc ~= 0 then exit rc
-
- call setclip(base'Path'seq, result.1)
- call setclip(base'Ext'seq, result.3)
- call setclip(base'LZW'seq, result.5)
-
- exit
-